<template>
    <div style="margin-top: 40px" >
      <span>count: {{ iCountTest }}</span>
      <el-input v-model="iCount" ></el-input>
      <el-button @click="handleSetCount">SetCount</el-button>
      <el-button @click="sayHello">按钮2</el-button>

      <el-button v-for="(item, index) in testDat">{{item}}</el-button>
    </div>
</template>

<script>

import { mapState } from 'vuex'
import {testDat} from "@/utils/drawdat/drawtool"

export default {
    data() {
      return {
        testDat ,
        iCount: 10, 
      }
    },
    computed: {
        ...mapState([
            'iCountTest',
        ]),
    },

    created(){
      // console.log(this.testDat)
    },

    methods: {
      sayHello( ){
        console.log("hello")
      },
      handleSetCount(){
        this.$store.commit('setCount',  this.iCount )
      }
    },
}
</script>

<style lang="scss">

</style>
